import React from 'react';
import './title.less';
// import ipcRender from '../../ipcRender';
// import {isH5}  from '../../config/web.config';
import { Icon } from 'antd';
import SvgIcon from '../../component/svgIcon/SvgIcon';
// import Button from 'antd/es/button';
// import { titleImg } from '../../config/imojiDataList';

export class Title extends React.Component<any, any>{
    constructor(props: any) {
        super(props);
        this.state={
            isTop:false
        }
    }

    render() {
        return (
            <div className="top-title" >
                <span className="icon" onClick={()=>{
                    ipcRender.setTop(!this.state.isTop);
                    this.setState({
                        isTop:!this.state.isTop
                    })
                }}>
                    <SvgIcon name="common-lock" size='12' color={this.state.isTop?'#4A94FF':'#666666'}></SvgIcon>
                </span>
                <span className="icon"  onClick={ipcRender.min}>
                    <SvgIcon name="common-min" size='9'></SvgIcon>
                </span>
                <span className="icon"  onClick={ipcRender.max}>
                    <SvgIcon name="common-max" size='9'></SvgIcon>
                </span>
                <span className="icon" onClick={ipcRender.close}>
                    <SvgIcon name="common-close" size='8'></SvgIcon>
                </span>
                
            </div>:null
        )
    }
}
